package com.itbaizhan.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itbaizhan.domain.Product;
import com.itbaizhan.dto.ProductDto;
import com.itbaizhan.mapper.ProductMapper;
import com.itbaizhan.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 13487
 * @description 针对表【tb_product】的数据库操作Service实现
 * @createDate 2024-05-06 17:10:15
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product>
        implements ProductService {

    @Autowired
    private ProductMapper productMapper;

    @Override
    public Page<Product> findProduct(ProductDto productDto) {
        return productMapper.selectPage(new Page<Product>(productDto.getPageNum(),productDto.getPageSize()), null);
    }
}




